import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;

public class ExOnReadLogFile {

	public static void main(String[] args) {

		String line = null;
		StringBuilder sb = null;;
		BufferedReader br = null;
		try {
			FileReader fileReader = new FileReader("C:\\glrd_2013-07-03.log");
			br = new BufferedReader(fileReader);
			while ((line = br.readLine()) != null) {
				sb = new StringBuilder();
				StringTokenizer sTokenizer = new StringTokenizer(line, "[]");
				boolean isFirstToken = false;
				String lineTkn = null;
				while (sTokenizer.hasMoreTokens()) {
					lineTkn = sTokenizer.nextToken();
					if (!isFirstToken) {
						String stringArr[] = lineTkn.split(",");
						sb.append(stringArr[0]);
						isFirstToken = true;
						sb.append("-->");
					}
				}
				if(lineTkn != null){ //sometimes it will be null 
					sb.append(lineTkn);
				}
				System.out.println(sb.toString());
			}

		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (br != null) {
				try {
					br.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}

		}
	}

}
